import cv2
import numpy as np
cap=cv2.VideoCapture(r"C:\Users\deng\Desktop\video.mp4")
while True:
    ret,frame=cap.read()
    if ret:
        cv2.imshow(frame)
    key=cv2.waitKey(25)
    if key==27:
        break
cap.release()
cv2.destroyAllWindows()